import Svg,{
  Circle,
  Ellipse,
  G,
  Text,
  TSpan,
  TextPath,
  Path,
  Polygon,
  Polyline,
  Line,
  Rect,
  Use,
  Image,
  Symbol,
  Defs,
  LinearGradient,
  RadialGradient,
  Stop,
  ClipPath,
  Pattern,
  Mask,
} from 'react-native-svg';

/* Use this if you are using Expo
import { Svg } from 'expo';
const { Circle, Rect } = Svg;
*/

import React from 'react';
import { View, StyleSheet, Dimensions } from 'react-native';

// Percentages work in plain react-native but aren't supported in Expo yet, workaround with this or onLayout
const { width, height } = Dimensions.get('window');

export default class SvgExample12 extends React.Component {


  render() {
    return (
      <View style={{...StyleSheet.absoluteFill,alignItems: 'center', justifyContent: 'center' }}>
        <Svg
          height="150"
          width="110"
        >
          <Symbol id="symbol" viewBox="0 0 150 110" width="100" height="50">
            <Circle cx="50" cy="50" r="40" strokeWidth="8" stroke="red" fill="red"/>
            <Circle cx="90" cy="60" r="40" strokeWidth="8" stroke="green" fill="white"/>
          </Symbol>

          <Use
            href="#symbol"
            x="0"
            y="140"
            width="20"
            height="10"
          />
          <Use
            href="#symbol"
            x="0"
            y="50"
            width="75"
            height="38"
          />
          <Use
            href="#symbol"
            x="0"
            y="100"
            width="50"
            height="25"
          />
        </Svg>
      </View>
    );
  }
}